#include "Ptr_to_T.h"
#include <iostream>
using namespace std;

int main() {
	cout << "TT��size:" << sizeof(TT) << endl;
	TT v[200];
	v[0].set_m(1);
	v[1].set_m(111);
	v[2].set_m(222);
	v[4].set_m(444);
	cout << "v0:" << v[0].get_m() << endl;
	cout << "v1:" << v[1].get_m() << endl;
	Ptr_to_T<TT> p(&v[0],3);
	cout << "*p:" << (*p).get_m()<< endl;
	++p;
	cout << "*p(p->v1):" << (*p).get_m() << endl << endl;

	Ptr_to_T<TT> q = p++;
	cout << "*p(p->v2):" << (*p).get_m()<<endl;
	cout << "*q(q->v1):" << (*q).get_m() << endl;
	p = q;
	p = &v[4];
	p->set_m(8848);
	cout<<p->get_m();
	p = &v[0];
	try
	{
		++p;
		++p;
		
	}
	catch (const char* msg)
	{
		cerr <<"����"<< msg << endl;
	}
	



}